/* components/exam-question/exam-question.less */
@primary-color: #1890FF; // 更新主色
@correct-color: #52C41A; // 更新正确答案颜色
@incorrect-color: #FF4D4F; // 更新错误答案颜色
@border-color: #e0e0e0;
@shadow-color: rgba(0, 0, 0, 0.1);
@text-gray: #999;
@danger-color: #FF4D4F;
@success-color: #52C41A;
@favorite-color: #FFD700;

.question-card {
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 16rpx;
  box-shadow: 0 6rpx 16rpx @shadow-color; // 优化阴影效果
  position: relative;
  // padding: 20rpx;
  // 为底部按钮区域留出空间，防止内容被遮挡
  padding-bottom: 180rpx;
}

.question-content {
  font-size: 28rpx;
  font-weight: 500;
  color: #333; // 使用更深的文字颜色
  line-height: 1.4;
  padding: 20rpx 10rpx 10rpx 10rpx;
  
  .content-image {
    width: 100%;
    margin: 10rpx 0;
    border-radius: 10rpx;
  }
}

.options {
  margin-bottom: 20rpx;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 24rpx 16rpx; // 增加内边距
  margin-bottom: 16rpx; // 增加选项间距
  border: 2rpx solid @border-color;
  border-radius: 12rpx;
  background: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); // 优化动画曲线

  &:last-child {
    margin-bottom: 0;
  }

  &:active {
    opacity: 0.8;
    transform: scale(0.99);
  }
}

/* 选项状态 */
.option-item.corrected {
  border-color: @correct-color;
  background-color: rgba(@correct-color, 0.05);

  .option-label {
    background-color: @correct-color;
    color: white;
  }
}

.option-item.incorrected {
  border-color: @incorrect-color;
  background-color: rgba(@incorrect-color, 0.05);

  .option-label {
    background-color: @incorrect-color;
    color: white;
  }
}

.option-label {
  width: 60rpx;
  height: 60rpx;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin-right: 20rpx;
  transition: all 0.3s ease;
}

.option-content {
  flex: 1;
  color: #555; // 稍微加深选项文字颜色
}

/* 优化后的解析区域 */
.answer-section {
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s ease;

  &.show {
    max-height: none;
    // padding-bottom: 20rpx;
  }
  
  .answer-analysis {
    display: block;
    font-size: 28rpx;
    color: #666;
    line-height: 1.6;
    background-color: #f9f9f9;
    padding: 20rpx; // 增加内边距
    // border-radius: 10rpx;
    border-left: 6rpx solid #1890FF; // 增加左侧色条，更醒目
  }
  
  .analysis-image {
    width: 100%;
    margin: 10rpx 0;
    border-radius: 10rpx;
  }
}

.answer-title {
  display: block;
  font-weight: bold;
  font-size: 28rpx;
  color: @primary-color;
  padding: 10rpx;
}

/* 知识点标签 */
.knowledge-tags {
  margin-top: 30rpx;
}

.tag-title {
  display: block;
  font-size: 28rpx;
  color: #909399;
  margin-bottom: 15rpx;
}

.tags {
  display: flex;
  flex-wrap: wrap;
}

.tag {
  font-size: 26rpx;
  background: #e6f7ff;
  color: @primary-color;
  padding: 8rpx 20rpx;
  border-radius: 8rpx;
  margin-right: 15rpx;
  margin-bottom: 10rpx;
}

/* 优化后的切换按钮 */
.toggle-btn {
  background: @primary-color;
  color: white;
  padding: 8rpx 20rpx;
  border-radius: 40rpx;
  min-width: 0;
  width: auto;
  height: 60rpx;
  display: inline-block;
  box-sizing: border-box;
  white-space: nowrap;
  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  font-size: 26rpx;
  line-height: 44rpx;
  min-width: 180rpx;
  text-align: center;
  margin-top: 30rpx;
  // 为按钮添加底部间距，确保即使解析内容很长也不会被遮挡
  // margin-bottom: 120rpx;
  
  &:active {
    background: #40a9ff; // 按下时的颜色变化
    transform: scale(0.98);
  }
}

/* 题目操作按钮 */
// .question-actions {
//   display: flex;
//   justify-content: space-around;
//   margin-top: 30rpx;
//   padding: 0 20rpx;
//   position: absolute;
//   bottom: 20rpx;
//   left: 0;
//   right: 0;
// }

// .action-btn {
//   flex: 1;
//   margin: 0 10rpx;
//   border-radius: 40rpx;
//   height: 60rpx;
//   display: flex;
//   align-items: center;
//   justify-content: center;
//   font-size: 26rpx;
//   border: 2rpx solid @border-color;
//   background: #fff;
  
//   &.favorite-btn {
//     color: @primary-color;
//     border-color: @primary-color;
    
//     .favorited {
//       color: @favorite-color;
//     }
//   }
  
//   &.report-btn {
//     color: @danger-color;
//     border-color: @danger-color;
//   }
// }